package Tests;
import junit.framework.Assert;
import org.junit.Test;
import Core.*;

public class CharacterClassFactoryImplTests
{
	@Test
	public void CreatesBarbarian()
	{
		CharacterClassFactory classFactory = CharacterClassFactoryImpl.getInstance();
		
		CharacterClass barbarian = classFactory.getClassByName("Barbarian");
		
		Assert.assertNotNull(barbarian);

		// Requirements are set up correctly
		Assert.assertEquals(0, barbarian.getRequirementsForLevel(1).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(2).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(3).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(4).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(5).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(6).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(7).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(8).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(9).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(10).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(11).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(12).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(13).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(14).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(15).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(16).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(17).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(18).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(19).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(20).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(21).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(22).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(23).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(24).size());
		Assert.assertEquals(1, barbarian.getRequirementsForLevel(25).size());
	}
}
